package com.my.java.design_mode.template.pojo;

public abstract class ActivityBaseService {
	
       //参与活动
        public void participation(int type,int budget){
                preCount();
                subtractBudget(type, budget);
                afterCount();
        }
        
         //处理前方法
        protected abstract void preCount();
	
	//处理预算
        protected void subtractBudget(int type,int budget){
                System.out.println("扣减预算:"+budget);
        }
        //处理后方法
        protected abstract void afterCount();
}
